<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>入金列表</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <include file="Index/common_css"/>
    <link href="__PUBLIC__/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <!--分页样式-->
    <style type="text/css">
        div.green-black{padding:3px;margin:3px;text-align:center;}
        div.green-black a{border:#2c2c2c 1px solid;padding:2px 5px;background: #2c2c2c;color:#fff;margin:0 2px 0 0;text-decoration:none;}
        div.green-black a:hover{border:#aad83e 1px solid;background:#aad83e;color:#fff;}
        div.green-black a:active{border:#aad83e 1px solid;background:#aad83e;color:#fff;}
        div.green-black span.current{border:#aad83e 1px solid;padding:2px 5px;font-weight:bold;background:#aad83e;color:#fff;margin:0 2px 0 0;}
        div.green-black span.disabled{border:#f3f3f3 1px solid;padding:2px 5px;color:#ccc;margin:0 2px 0 0;}
    </style>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>我的交易</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <if condition="$num[0]['sum(volume)'] eq null">
                                总交易量：0
                                <else/>
                                总交易量：{$num[0]['sum(volume)']/100|intval=###}
                            </if>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" >
                            <if condition="$num[0]['sum(swaps)'] eq null">
                                库存费：0
                                <else/>
                                库存费：{$num[0].sum(swaps)|intval=###}
                            </if>
                        </a>
                        <a class="close-link">
                            <if condition="$num[0]['sum(commission)'] eq null">
                                手续费：0
                                <else/>
                                手续费：{$num[0].sum(commission)|intval=###}
                            </if>
                        </a>
                        <a class="close-link">
                            <if condition="$num[0]['sum(profit)'] eq null">
                                获利：0
                                <else/>
                                获利：{$num[0].sum(profit)|intval=###}
                            </if>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <form action="__MODULE__/MyDeal/myDeal_history" method="post">
                            <div class="col-sm-2 m-b-xs">
                                <select name="user_id" class="input-sm form-control input-s-sm inline">
                                    <option value="{$user.user_id}">{$user.user_id}</option>
                                </select>
                            </div>
                            <div class="col-sm-2 m-b-xs">
                                <select name="type" class="input-sm form-control input-s-sm inline">
                                    <option value="">全部</option>
                                    <option value="1" <if condition="$type eq 1">selected="selected"</if>>BUY</option>
                                    <option value="2" <if condition="$type eq 2">selected="selected"</if>>SELL</option>
                                </select>
                            </div>
                            <div class="col-sm-4 m-b-xs">
                                时间 ：
                                <input type="text" id="from" name="fo" value="{$fo}" placeholder="开始时间" class="laydate-icon form-control layer-date" style="width:40%;display:inline-block;"> -
                                <input type="text" id="to" name="to" value="{$to}" placeholder="结束时间" class="laydate-icon form-control layer-date" style="width:40%;display:inline-block;">
                            </div>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <span class="input-group-btn">
                                        <button type="submit" class="btn btn-w-m btn-info">搜索</button>
                                    </span>
                                </div>
                            </div>
                        </form>
                        <form method="post" action="__MODULE__/MyDeal/myDeal_history_download">
                            <input type="hidden" name="fo" id="fo" value="{$fo}" />
                            <input type="hidden"  name="to" value="{$to}"/>
                            <input type="hidden"  name="type" value="{$type}"/>
                            <button type="submit"  class="btn btn-sm btn-success left"><i class="fa fa-download">下载已查询数据</i></button>
                        </form>
                    </div>

                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <!--<th><input type="checkbox" class="i-checks" name="input[]"></th>-->
                                <th>订单号</th>
                                <th>MT4账号</th>
                                <th>交易品种</th>
                                <th>交易类型</th>
                                <th>交易量</th>
                                <th>开仓时间</th>
                                <th>平仓时间</th>
                                <th>开仓价格</th>
                                <th>平仓价格</th>
                                <th>S/L</th>
                                <th>T/P</th>
                                <th>手续费</th>
                                <th>库存费</th>
                                <th>获利</th>
                                <th>备注</th>
                            </tr>
                            </thead>
                            <tbody>
                            <foreach name="data" item="data">
                                <tr>
                                    <!--<td><input type="checkbox" class="i-checks" name="input[]"></td>-->
                                    <td>{$data.ticket}</td>
                                    <td><span class="pie">{$data.login}</span></td>
                                    <td>{$data.symbol}</td>
                                    <td>{$data.cmd}</td>
                                    <td>{$data.volume|round=###,2}</td>
                                    <td>{$data.open_time}</td>
                                    <td>{$data.close_time}</td>
                                    <td>{$data.open_price}</td>
                                    <td>{$data.close_price}</td>
                                    <td>{$data.sl}</td>
                                    <td>{$data.tp}</td>
                                    <td><span class="pie">{$data.commission}</span></td>
                                    <td>{$data.swaps|round=###,2}</td>
                                    <td>{$data.profit|round=###,2}</td>
                                    <td>{$data.comment}</td>
                                </tr>
                            </foreach>
                            </tbody>
                        </table>

                        <div class="green-black">{$page}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 全局js -->
<include file="Index/common_js"/>
<!-- Peity -->
<script src="__PUBLIC__/admin/js/plugins/peity/jquery.peity.min.js"></script>
<!-- 自定义js -->
<script src="__PUBLIC__/admin/js/content.js?v=1.0.0"></script>
<script src="__PUBLIC__/common/js/layer_show.js"></script>
<!-- iCheck -->
<script src="__PUBLIC__/admin/js/plugins/iCheck/icheck.min.js"></script>
<script src="__PUBLIC__/admin/js/plugins/layer/laydate/laydate.js"></script>
<script>
    $(document).ready(function () {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });

        laydate({
            elem: '#from', /*目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'*/
            event: 'focus', /*响应事件。如果没有传入event，则按照默认的click*/
            //format: 'YYYY-MM-DD hh:mm:ss',
        });
        laydate({
            elem: '#to', /*目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'*/
            event: 'focus', /*响应事件。如果没有传入event，则按照默认的click*/
            //format: 'YYYY-MM-DD hh:mm:ss',
        });
        $(".btn-info").on('click',function () {
            var index = layer.load(0, {shade: false}); //0代表加载的风格，支持0-2
        })
    });


    function member_edit(t,u,w,h) {
        layer_show(t,u,w,h);
    }



</script>
</body>
</html>
